/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.persistence.core;

import com.blandware.atleap.model.core.GlobalProperty;

import java.util.List;

/**
 * <p>DAO for global properties</p>
 * <p><a href="GlobalPropertyDAO.java.html"><i>View Source</i></a></p>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.4 $ $Date: 2006/08/03 10:07:36 $
 */
public interface GlobalPropertyDAO extends DAO {

	// ~ CRUD Methods ================================================================

	/**
	 * Creates new global property
	 *
	 * @param globalProperty Value object that represents what property must be created
	 */
	public void createGlobalProperty(GlobalProperty globalProperty);

	/**
	 * Retrieves global property with specified name
	 *
	 * @param propertyName Name of property
	 * @return Global property or null if no global property with specified name exists in database
	 */
	public GlobalProperty retrieveGlobalProperty(String propertyName);

	/**
	 * Updates global property
	 *
	 * @param globalProperty Property to update
	 */
	public void updateGlobalProperty(GlobalProperty globalProperty);

	/**
	 * Deletes global property
	 *
	 * @param globalProperty Property to delete
	 */
	public void deleteGlobalProperty(GlobalProperty globalProperty);

	// ~ Additional methods ================================================================

	/**
	 * Retrieves list of dynamic global properties. Dynamic global properties are
     * those that are stored in a persistent storage.
	 *
	 * @return list of dynamic properties
	 */
	public List listDynamicProperties();
}
